if(MSVC)
    set(CMAKE_CXX_FLAGS "/bigobj ${CMAKE_CXX_FLAGS}")
else()
    include(CheckLinkerFlag)
    check_linker_flag(CXX "LINKER:--no-keep-memory" HAVE_NO_KEEP_MEMORY)
    if(HAVE_NO_KEEP_MEMORY)
        add_link_options("$<$<LINK_LANGUAGE:CXX>:LINKER:--no-keep-memory>")
    endif()
    check_linker_flag(CXX "LINKER:-Bsymbolic" HAVE_BSYMBOLIC)
    if(HAVE_BSYMBOLIC)
        add_link_options("$<$<LINK_LANGUAGE:CXX>:LINKER:-Bsymbolic>")
    endif()
endif()
